﻿using TBFramework;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(StepProperty)), CanEditMultipleObjects]
public class CustomTransformEditor : Editor
{
    public override void OnInspectorGUI()
    {
    
        DrawDefaultInspector();
        StepProperty myScript = (StepProperty)target;
        if (GUILayout.Button("点击我"))
        {
           // myScript.DoSomething(); // 调用你的方法
        }
        if (GUILayout.Button("多选物体"))
        {
            GameObject[] selectedObjects = Selection.gameObjects;
            foreach (GameObject obj in selectedObjects)
            {
                if (obj != null)
                {
                  //  GameObject newObj = Instantiate(obj);
                  //  newObj.transform.position = obj.transform.position;
                  //  GameObject.Find("Canvas").GetComponent<StepProperty>().StepCurrentPropertyItem.stepCurrentProperty.CarouselImage.g.Add(obj);
                    // StepProperty.setup1.g.Add(obj);
                }
            }
        }
    }
}